Police Roadblock Placement customizer v3.1:
by winnypeg1273
Add your own police roadblocks! Now highly customizable!

This mod allows you to add and modify your own police roadblock points. 
You can customize the police models to your desire.
Roadblocks will spawn whenever you're in a vehicle near the place with 3 or more wanted stars.

____roadblock features_____
+ roadblock models are customizable. (v1.5)
+ models can be set to scale up with the wanted level by default or unchanged (v3.0)
+ uses the reverse engineered spawning algorithm from the game (v2.0)
+ the spacing and number of cars (up to 5) are automatically calculated based on the block length (v2.0)
+ the car directions are either facing the player or along the block line (v2.1)
+ blocking barrier objects are added (v2.6)
+ cops and objects are placed based on which side the player is approaching (v2.6)

- minor setbacks: roadblocks may suddenly spawn if you're driving too fast
- sometimes barriers may be found under the ground

what's new:
v3.1: blocking barriers are created only when you're close in (to avoid draw distance despawn).

____Instruction______

installation:
Extract the .cs and .ini files into your cleo folder, or into a modloader subfolder
Requirements: cleo 3 or 4

The .ini file is where you will add the placement and model data for the roadblocks, and .cs is the code script
DON'T RENAME THE .INI FILE

.ini file instruction:
#input number (N) of the custom roadblocks you want to add in the very first section [RBLOCK]

#sections [custom0], [custom1], etc.
these are the groups of police models that will be used
recommended to keep at least 7, from custom0 to custom6 but you can add more

each custom includes the model ids for cars, cop skins, and weapons
default mode (unless specified later):
custom0 to custom3 is used for the local cop skins at only 3 stars (countryside and each of the cities)
custom4 to custom6 is used for the tactical skins from 4 to 6 stars respectively (swat, fbi, military)

link to list of skin ids: wiki.multitheftauto.com/wiki/All_Skins_Page
car ids: wiki.multitheftauto.com/wiki/Vehicle_IDs

weapon ids: hotmist.ddo.jp/id/weapon.html
important to note: 
1/ for weapons use id for the weapon type, not the weapon model! 
for example, use id 22 for the regular pistol (instead of 346)

2/ give your cops guns only, not other types of weapons
deagle (24) or silenced pistol (23) will seem to cause crash for some reasons

3/ special character skins are not recommended


#in each section [coord1] up to [coordN]
the first six params are the xyz coords of the two endpoints where a line of roadblock will spawn in between (see instruction image)
point A: x1, y1, z1
point B: x2, y2, z2
be sure your points A and B are not too far from each other.

the mode and skin are optional params
mode: boolean setting, default 0 (or blank) means that the custom models will scale according to your stars, and 1 means the models stay the same.
skin: one of the customs defined above, where it will be used at only 3 star level with mode=0, or at any star with mode=1.
for instance skin=69 means it will use the custom69 models etc for the local cop skin (if it's defined).

if skin is left blank, the custom will be automatically selected based on your current town.

you might want to set mode=1 in places like near the army base and you want only soldiers to spawn there.

note: 1) add as many coord sections as the number N you configured at the very top of the ini file
for example if you put N=4 then you gotta make 4 coord sections in the ini file
2) if you leave a custom section blank and use that as skin for your coord, it won't be loaded and nothing will spawn when you pass the place

I added some roadblocks in the ini file, but feel free to edit and experiment.


game coordinates:
to know your game coordinate, download additional mods to display coordinates:
https://www.gtagarage.com/mods/show.php?id=22962
you can also use a program called "San Andreas placement manager"
if you have Sanny Builder, go to Tools -> IDE tools -> Coord manager
____________________________________

if everything is done correctly, when you got 3+ wanted level and approach the place you should see blocking police cars and officers of your models
this mod doesn't remove or modify the hardcoded roadblocks created by Rockstar.

##################################

